{include h}
<div class="container">
  <div id="main">
    <!--{hook t_top_left_box}-->
    <!--{hook t_forum_thread_top_left_box}-->
    <div class="wrap-box">
      <a href="{#WWW}">{$_LANG['论坛首页']}</a>
      
      <?php $tmp_fid = forum($forum,$fid,'fid'); ?>
   
      <?php
      //$tmp_str = '';
        while ($tmp_fid != -1) {
          echo '<span class="dhsp"> > </span><a href="';
          HYBBS_URL('forum','',forum($forum,$tmp_fid,'id'));
          echo '">'.forum($forum,$tmp_fid,'name').'</a>';
          if($forum[$tmp_fid]['fid'] != -1){
            $tmp_fid = forum($forum,$tmp_fid,'fid');
          }else{
            break; 
          }
        }
        //echo $tmp_str;
      ?>


      <span class="dhsp"> > </span>
      {php echo forum($forum,$fid,'name');}
    </div>
    <div class="h-20"></div>
    <div class="wrap-box t-list">
      <div class="head with-btns">
      <!--{hook t_forum_thread_list_head}-->
        <span class="Select">
          <select class="Select-input FormControl">
            <option value="{php HYBBS_URL('forum',$fid,'new');}" {if isset($_GET['HY_URL'][2])}{if $_GET['HY_URL'][2] == 'new'}selected{/if}{/if}>{$_LANG['最新主题']}</option>
            <option value="{php HYBBS_URL('forum',$fid,'btime');}" {if isset($_GET['HY_URL'][2])}{if $_GET['HY_URL'][2] == 'btime'}selected{/if}{/if}>{$_LANG['最新回复']}</option>
          </select>
          <script type="text/javascript">
            $(".FormControl").change(function(){
                window.location.href = $(this).val();
            })
            </script>
          <img src="{#WWW}View/hy_boss/sort.png" class="Select-caret">
        </span>

        <a href="{php HYBBS_URL('post','index',['fid'=>$fid]);}" class="btn large pull-right"><img src="{#WWW}View/hy_boss/Write.png" style="width: 12px;margin-right: 8px;">{$_LANG['发表新主题']}</a>
        <!--{hook t_forum_thread_list_foot}-->
      </div>
      <div class="list">
      <!--{hook t_forum_thread_thread_list_top}-->
      {foreach $top_list as $v}
        <div class="item"> 
          <a href="{php HYBBS_URL('my',$v['user']);}" target="_blank">
          <img pos="right" src="{#WWW}{$v.avatar.b}" width="50" height="50" uid="{$v.uid}" class="circle pull-left js-info">
          </a>
          <div class="middle text">
            <h4 class="title">
            <a style="{if $v['top']==2}font-weight: bold;color: #09C;{/if}" href="{php HYBBS_URL('thread',$v['tid']);}" >{if $v['top']==2}<span class="qzd">{$_LANG['全站置顶']}</span>{elseif $v['top']==1}<span class="fzd">{$_LANG['本版置顶']}</span>{/if}{$v.title}</a>
            </h4>
            <div class="meta">
              <a href="{php HYBBS_URL('my',$v['user']);}" class="author" target="_blank">{$v.user}</a>&nbsp;&nbsp;·&nbsp;&nbsp;{$_LANG['发表于']} {php echo humandate($v['atime']);}&nbsp;&nbsp;·&nbsp;&nbsp;{if isset($v['buser'])}{$v.buser} {$_LANG['最后回复']} {php echo humandate($v['btime']);}{/if}
            </div>
          </div>
          {if $v['posts']}
          <a href="{php HYBBS_URL('thread',$v['tid']);}" class="comment" ><span class="badge {if ($v['btime']+1800) > NOW_TIME}badge-success{/if}">{$v.posts}</span></a>
          {/if}
        </div>
        {/foreach}
      {foreach $top_f_data as $v}
        <div class="item">
          <a href="{php HYBBS_URL('my',$v['user']);}" target="_blank">
          <img pos="right" src="{#WWW}{$v.avatar.b}" width="50" height="50" uid="{$v.uid}" class="circle pull-left js-info">
          </a>
          <div class="middle text">
            <h4 class="title">
            <a  style="{if $v['top']==1}font-weight: bold;color: #CE792D;{/if}" href="{php HYBBS_URL('thread',$v['tid']);}" >{if $v['top']==2}<span class="qzd">{$_LANG['全站置顶']}</span>{elseif $v['top']==1}<span class="fzd">{$_LANG['本版置顶']}</span>{/if}{$v.title}</a>
            </h4>
            <div class="meta">
              <a href="{php HYBBS_URL('my',$v['user']);}" class="author" target="_blank">{$v.user}</a>&nbsp;&nbsp;·&nbsp;&nbsp;{$_LANG['发表于']} {php echo humandate($v['atime']);}&nbsp;&nbsp;·&nbsp;&nbsp;{if isset($v['buser'])}{$v.buser} {$_LANG['最后回复']} {php echo humandate($v['btime']);}{/if}
            </div>
          </div>
          {if $v['posts']}
          <a href="{php HYBBS_URL('thread',$v['tid']);}" class="comment" ><span class="badge {if ($v['btime']+1800) > NOW_TIME}badge-success{/if}">{$v.posts}</span></a>
          {/if}
        </div>
        {/foreach}
        {foreach $data as $v}
        <div class="item">
          <a href="{php HYBBS_URL('my',$v['user']);}" target="_blank">
          <img pos="right" src="{#WWW}{$v.avatar.b}" width="50" height="50" uid="{$v.uid}" class="circle pull-left js-info">
          </a>
          <div class="middle text">
            <h4 class="title">
            <a style="color: #09c;" href="<?php HYBBS_URL('forum',$v['fid']); ?>">[ {php echo forum($forum,$v['fid'],'name');} ]</a>
            <a href="{php HYBBS_URL('thread',$v['tid']);}" >{$v.title}</a>
            </h4>
            <div class="meta">
              <a href="{php HYBBS_URL('my',$v['user']);}" class="author" target="_blank">{$v.user}</a>&nbsp;&nbsp;·&nbsp;&nbsp;{$_LANG['发表于']} {php echo humandate($v['atime']);}&nbsp;&nbsp;·&nbsp;&nbsp;{if isset($v['buser'])}{$v.buser} {$_LANG['最后回复']} {php echo humandate($v['btime']);}{/if}
            </div>
          </div>
          {if $v['posts']}
          <a href="{php HYBBS_URL('thread',$v['tid']);}" class="comment" ><span class="badge {if ($v['btime']+1800) > NOW_TIME}badge-success{/if}">{$v.posts}</span></a>
          {/if}
        </div>
        {/foreach}
        <!--{hook t_forum_thread_thread_list_bottom}-->

      </div>
    </div>
    <div class="h-20"></div>
    <div class="wrap-box">
    <!--{hook t_forum_thread_page_top}-->
      <a href="{if $pageid==1}javascript:void(0);{else}{php HYBBS_URL('forum',$fid,[$type=>$pageid-1]);}{/if}"  class="btn bg-primary {if $pageid==1}disabled{/if}" >{$_LANG['上一页']}</a>
      <a  href="{if $pageid==$page_count}javascript:void(0);{else}{php HYBBS_URL('forum',$fid,[$type=>$pageid+1]);}{/if}" class="btn bg-primary large pull-right {if $pageid==$page_count}disabled{/if}" >{$_LANG['下一页']}</a>
      <!--{hook t_forum_thread_page_bottom}-->
    </div>
  </div>
  {include r_m}
</div>

{include f}
